package com.timber.util;


import java.util.*;

/**
 * this class handles 2 delimeters next to each other in the file
 */
public class SLStringTokenizer extends StringTokenizer {

  private String retString = "";
  private static String lastRead = "";
  private static String thisRead = "";
  private static String delim = "";

  public SLStringTokenizer(String str, String delim, boolean returnDelims) {
    super(str,delim,returnDelims);
    this.delim = delim;
  }
  public String nextToken() {
    lastRead = thisRead;
    thisRead = super.nextToken();
    if (thisRead.equals(delim) == true) {
      if (lastRead.equals(delim) == true)
	retString = "";
      else
	nextToken();
    }
    else {
      retString = thisRead;
    }
    return retString;
  }

}